<!doctype html>
<html class="x-admin-sm">
<!--主页信息-->
<head>
    <meta charset="UTF-8">
    <title>后台-气清</title>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="stylesheet" href="./css/font.css">
    <link rel="stylesheet" href="./css/xadmin.css">
    <link rel="shortcut icon" href="./images/favicon.ico"/>
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <script type="text/javascript" src="https://cdn.bootcss.com/blueimp-md5/2.10.0/js/md5.min.js"></script>
    <script src="./lib/layui/layui.js" charset="utf-8"></script>

    <script type="text/javascript" src="./js/xadmin.js"></script>
    <script type="text/javascript" src="./js/cookie.js"></script>
    <script>
        // 是否开启刷新记忆tab功能
        // var is_remember = false;
        // $.ajax({
        //     url: '/index/findAdminName',
        //     dataType: 'json',
        //     type: 'post',
        //     async:false,
        //     success:function (data) {
        //
        //     }
        // })
    </script>
</head>
<body>
<!-- 顶部开始 -->
<div class="container">
    <div class="logo"><a href="http://manage.qk.com/doIndex">气清商城后台管理系统</a></div>
    <div class="left_open">
        <i title="展开左侧栏" class="iconfont">&#xe699;</i>
    </div>

    <ul class="layui-nav right" lay-filter="">
        <li class="layui-nav-item">
            <a href="javascript:;" id="username">[[${username}]]</a>
            <dl class="layui-nav-child"> <!-- 二级菜单 -->

                <dd><a href="/doLogout">退出</a></dd>
            </dl>
        </li>
        <li class="layui-nav-item to-index"><a href="http://www.qk.com/index">前台首页</a></li>
    </ul>

</div>
<!-- 顶部结束 -->
<!-- 中部开始 -->
<!-- 左侧菜单开始 -->
<div class="left-nav">
    <div id="side-nav">
        <ul id="nav">
            <!--            shiro:hasPermisson="qk:item:view"-->
            <li id="item">
                <a href="javascript:;">
                    <i class="iconfont">&#xe723;</i>
                    <cite>商品管理</cite>
                    <i class="iconfont nav_right">&#xe697;</i>
                </a>
                <ul class="sub-menu">
                    <li date-refresh="1">
                        <a _href="item-list.html">
                            <i class="iconfont">&#xe6a7;</i>
                            <cite>商品列表</cite>
                        </a>
                    </li>
                </ul>
            </li>
            <li id="order">
                <a href="javascript:;">
                    <i class="iconfont">&#xe723;</i>
                    <cite>订单管理</cite>
                    <i class="iconfont nav_right">&#xe697;</i>
                </a>
                <ul class="sub-menu">
                    <li>
                        <a _href="order-list.html">
                            <i class="iconfont">&#xe6a7;</i>
                            <cite>订单列表</cite>
                        </a>
                    </li>
                </ul>
            </li>

            <li id="admin">
                <a href="javascript:;">
                    <i class="iconfont">&#xe726;</i>
                    <cite>管理员管理</cite>
                    <i class="iconfont nav_right">&#xe697;</i>
                </a>
                <ul class="sub-menu">
                    <li>
                        <a _href="admin-list.html">
                            <i class="iconfont">&#xe6a7;</i>
                            <cite>管理员列表</cite>
                        </a>
                    </li>
                </ul>
            </li>
            <li id="role">
                <a href="javascript:;">
                    <i class="iconfont">&#xe726;</i>
                    <cite>职位管理</cite>
                    <i class="iconfont nav_right">&#xe697;</i>
                </a>
                <ul class="sub-menu">
                    <li>
                        <a _href="admin-role.html">
                            <i class="iconfont">&#xe6a7;</i>
                            <cite>职位列表</cite>
                        </a>
                    </li>
                </ul>
            </li>

            <li id="personal">
                <a href="javascript:;">
                    <i class="iconfont">&#xe726;</i>
                    <cite>个人信息</cite>
                    <i class="iconfont nav_right">&#xe697;</i>
                </a>
                <ul class="sub-menu">
                    <li>
                        <a _href="personal.html">
                            <i class="iconfont">&#xe6a7;</i>
                            <cite>个人信息</cite>
                        </a>
                    </li>
                    <li>
                        <a _href="changepass.html">
                            <i class="iconfont">&#xe6a7;</i>
                            <cite>修改密码</cite>
                        </a>
                    </li>
                </ul>
            </li>
            <li id="OA">
                <a href="javascript:;">
                    <i class="iconfont">&#xe726;</i>
                    <cite>OA管理</cite>
                    <i class="iconfont nav_right">&#xe697;</i>
                </a>
                <ul class="sub-menu">
                    <li>
                        <a _href="apply-list.html">
                            <i class="iconfont">&#xe6a7;</i>
                            <cite>我的请假申请</cite>
                        </a>
                    </li>
                    <li>
                        <a _href="apply-H-list.html">
                            <i class="iconfont">&#xe6a7;</i>
                            <cite>我的请假历史</cite>
                        </a>
                    </li>
                    <li id="pass">
                        <a _href="reply-list.html">
                            <i class="iconfont">&#xe6a7;</i>
                            <cite>待批复</cite>
                        </a>
                    </li>
                    <li id="showpass">
                        <a _href="reply-H.html">
                            <i class="iconfont">&#xe6a7;</i>
                            <cite>批复记录</cite>
                        </a>
                    </li>
                </ul>
            </li>
            <li id="log">
                <a href="javascript:;">
                    <i class="iconfont">&#xe69b;</i>
                    <cite>日志管理</cite>
                    <i class="iconfont nav_right">&#xe697;</i>
                </a>
                <ul class="sub-menu">
                    <li>
                        <a _href="log-list.html">
                            <i class="iconfont">&#xe6a7;</i>
                            <cite>日志列表</cite>
                        </a>
                    </li>
                </ul>
            </li>

        </ul>
    </div>
</div>
<!-- <div class="x-slide_left"></div> -->
<!-- 左侧菜单结束 -->
<!-- 右侧主体开始 -->
<div class="page-content">
    <div class="layui-tab tab" lay-filter="xbs_tab" lay-allowclose="false">
        <ul class="layui-tab-title">
            <li class="home"><i class="layui-icon">&#xe68e;</i>我的桌面</li>
        </ul>
        <div class="layui-unselect layui-form-select layui-form-selected" id="tab_right">
            <dl>
                <dd data-type="this">关闭当前</dd>
                <dd data-type="other">关闭其它</dd>
                <dd data-type="all">关闭全部</dd>
            </dl>
        </div>
        <div class="layui-tab-content" id="show">
            <div class="layui-tab-item layui-show">
                <iframe src='./welcome.html' frameborder="0" scrolling="yes" class="x-iframe"></iframe>
            </div>
        </div>
        <div id="tab_show"></div>
    </div>
</div>
<div class="page-content-bg"></div>
<!-- 右侧主体结束 -->
<!-- 中部结束 -->
<!-- 底部开始 -->
<div class="footer">
    <div class="copyright">Copyright ©2020 qiqing v2.3 All Rights Reserved</div>
</div>
<!-- 底部结束 -->
<script>
    layui.use(['layer', 'jquery', 'table', 'form'], function () {
        $ = layui.jquery;
        $(document).ready(function (obj) {
            $("#item").hide();  //26 商品
            $("#order").hide(); //27 订单
            $("#admin").hide(); //28 管理员
            $("#role").hide(); //29  角色
            $("#log").hide(); //25 日志
            $("#pass").hide(); //24待批复
            $("#showpass").hide(); //24批复记录

        })
        // $("#e").hide();
        // $.ajax({
        //     url:' /admin/getAdmin',
        //     dataType: 'json',
        //     type: 'get',
        //     success:function (data) {
        //         console.log(data);
        //         $('#username').val(data.data.name)
        //     }
        //
        // })


        $.ajax({
            url: '/admin-list/findMenusByName',
            dataType: 'json',
            type: 'post',
            // async:true,
            data: { "name": [[${username}]] },
            success: function (data) {
                var menusId = data.data;
                // console.log(data);
                // console.log(menusId[1]);
                for (var i = 0; i < menusId.length; i++) {
                    if (menusId[i] == 25) {
                        $("#log").show();
                    }
                    if (menusId[i] == 26) {
                        $("#item").show();
                    }
                    if (menusId[i] == 27) {
                        $("#order").show();
                    }
                    if (menusId[i] == 28) {
                        $("#admin").show();
                    }
                    if (menusId[i] == 29) {
                        $("#role").show();
                    }
                    if (menusId[i] == 24){
                        $("#pass").show(); //待批复
                        $("#showpass").show(); //批复记录
                    }
                }
            }
        })


    })

</script>
</body>
</html>